//
//  XMGVerticalButton.m
//  01-百思不得姐
//
//  Created by xiaomage on 15/7/26.
//  Copyright (c) 2015年 小码哥. All rights reserved.
//

#import "XMGVerticalButton.h"

@implementation XMGVerticalButton

- (void)setup
{
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}

- (void)awakeFromNib
{
    [self setup];
}


- (void)layoutSubviews
{
    [super layoutSubviews];
//    self.backgroundColor = [UIColor blackColor];
    // 调整图片
    self.imageView.x = 65 * px;
    self.imageView.y = 0;
    self.imageView.width = 100 * px;
    self.imageView.height = 100 * px;
   
    
    // 调整文字
    self.titleLabel.x = 20 * px;
    self.titleLabel.y = self.imageView.height + 30 * px;
    self.titleLabel.width = 200 * px;
    self.titleLabel.height = 50 * px;
    
}

@end
